package net.k3rnel.abugadro.gcodes;

import net.k3rnel.abugadro.providers.ExternalContentProvider;
import android.net.Uri;
import android.provider.BaseColumns;

public class Comment {

	public Comment() {
	}

	public static final class Comments implements BaseColumns {
		private Comments() {
		}

		public static final Uri CONTENT_URI = Uri.parse("content://"+ ExternalContentProvider.AUTHORITY + "/projects/*/issues/*/comments");

		public static final String CONTENT_TYPE_DIR = "vnd.android.cursor.dir/vnd.abugadro.comments";
		public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.abugadro.comments";

		public static final String _ID = "_id";
		public static final String PROJECT_ID = "proj_id";
		public static final String ISSUE_ID = "issue_id";
		public static final String COMMENT_ID = "comment_id";
		public static final String PUBLISHED = "published";
		public static final String UPDATED = "updated";
		public static final String TITLE = "title";
		public static final String CONTENT = "content";
		public static final String AUTHOR = "author";
		
		public static final String DEFAULT_SORT = UPDATED + " ASC";

		
		
		/** Build {@link Uri} for requested {@link #_ID}. */
        public static Uri buildUri(String projectId, String issueId) {
        	return Uri.parse("content://"+ ExternalContentProvider.AUTHORITY + "/projects/"+projectId+"/issues/"+issueId+"/comments");
        }
        public static Uri buildUri(String commentId) {
            return CONTENT_URI.buildUpon().appendPath(commentId).build();
        }
	}

}